<link rel="stylesheet" href="/shop/templates/mg/css/login.css">
<div class="login_wrap">
    <div class="logo_wrap">
        <div class="logo">

            <a title="易海购" href="/" class="logo_img">
                <?php
                    $img = tpl_get("logo");
                ?>
                <img src="<?php echo $img['pic']?>" height="60" width="220" alt="易海购">
            </a>
        </div>
    </div>


    <div class="content" style="background:url(http://s17.mogucdn.com/p2/170105/upload_541i9di2b3icf9j13f24e0bg7b1i6_1920x600.png) no-repeat center center;width: 100%;display:block;overflow: hidden">
        <div class="lg_banner">
            <a href="" target="_blank" class="banner1"></a>
        </div>
        <div class="lg_left ui-option-main-box" id="lg_content">

            <div class="login_mod_tab">
                <div class="fl mod">
                    <a class="lo_mod tab_on" lo-mod="normal" href="javascript:;" title="普通登入">登录</a>
                </div>
            </div>
            <div id="signform" class="formbox">
                <div class="lg_form">
                    <form method="post" action="<?php echo SHOP_SITE_URL;?>/index.php?act=login&op=login">
                        <!-- 正常登录 start -->
                        <?php Security::getToken();?>
                        <input type="hidden" name="form_submit" value="ok" />
                        <input name="nchash" type="hidden" value="<?php echo getNchash();?>" />
                        <div class="mod_box lo_mod_box" data-isshow="0">
                            <div class="ui-sign-item ui-name-item lg_item lg_name">
                                <input type="text" maxlength="32" class="ui-input pwd_text"  name="user_name" placeholder="用户名/邮箱/手机号" style="border-color:#CFCFCF;">
                            </div>
                            <div class="ui-sign-item ui-sign-common-item lg_item lg_pass">
                                <input type="password" maxlength="32" class="ui-input pwd_text"  name="password" value="" placeholder="密码" style="border-color:#CFCFCF;">
                            </div>
                        </div>

                        <div class="lg_login clearfix">
                            <input type="submit" value="登录" class="sub">
                        </div>
                        <div class="ot_login">
                            <div class="ot_btn clearfix">
                                <?php if ($output['setting_config']['qq_isuse'] == 1){?>
                                <a class="ui-ot-btn mr-42" href="<?php echo SHOP_SITE_URL;?>/api.php?act=toqq" data-type="qq"><img src="http://s17.mogucdn.com/p2/170104/upload_5763lkilh8f7abid345gbhh167d79_19x19.png">QQ登录</a>
                                <?php } ?>
                                <?php
                                    require_wechat();
                                    require_once(dirname(BASE_PATH) . '/wxpay/lib/WxPay.Config.php');
                                    $wechat = new WeChat(-1);
                                    $redirect = urlencode('http://' . $_SERVER['HTTP_HOST'] . '/shop/index.php?act=login&op=wechat_login');
                                    if(isset($_SESSION['wechat_openid'])){
                                        if(time() - $_SESSION['wechat_openid']['time'] < 300){
                                            ?>
                                            <script>
                                                $('[name=ref_url]').val('');
                                            </script>
                                            <?php
                                        }
                                    }
                                    $url = "https://open.weixin.qq.com/connect/qrconnect?appid={$wechat->config['open_appid']}&redirect_uri={$redirect}&response_type=code&scope=snsapi_login&state=STATE#wechat_redirect";
                                ?>

                                <a class="ui-ot-btn mr-42" href="<?php echo $url;?>" data-type="weixin"><img src="http://s16.mogucdn.com/p2/170104/upload_8d4dd486c18961b55lf0hbe5ebf7l_18x19.png">微信登录</a>

                                <?php if ($output['setting_config']['sina_isuse'] == 1){?>
                                    <a class="ui-ot-btn" href="<?php echo SHOP_SITE_URL;?>/api.php?act=tosina" ><img src="http://s18.mogucdn.com/p2/170104/upload_5i9ki009bi6kkc7lg3iibbbel7f6k_18x19.png">微博登录</a>
                                <?php }?>

                            </div>
                        </div>
                        <div class="lg_reg">
                            <a class="findpwd" href="index.php?act=login&op=forget_password">忘记密码</a>
                            <a class="regist" href="index.php?act=login&op=register">免费注册</a>
                        </div>
                        <input type="hidden" value="<?php echo $_GET['ref_url']?>" name="ref_url">
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
